package com.gopay.common.user.dao.impl;

import java.io.Serializable;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.springframework.stereotype.Repository;

import com.gopay.common.base.dao.impl.BaseDAOImpl;
import com.gopay.common.domain.user.identify.RcPayVerifyLimit;
import com.gopay.common.user.dao.RcPayVerifyLimitDAO;

/**
 * 
 * @RcPayVerifyLimitDAOImpl.java
 * @author songfengli
 * @2016年5月17日 下午1:08:47  www.gopay.com.cn Inc.All rights reserved.
 */


@Repository("rcPayVerifyLimitDao")
public class RcPayVerifyLimitDAOImpl extends BaseDAOImpl<RcPayVerifyLimit, Serializable> implements RcPayVerifyLimitDAO{

    @Override
    public RcPayVerifyLimit findByCode(String payType){
        String hql = "from RcPayVerifyLimit t where t.code=:payType";
        Map<String, Object> paramMap = new HashMap<String, Object>();
        paramMap.put("payType", payType);
        List<RcPayVerifyLimit> RcPayVerifyLimitList= this.findByHql(hql, paramMap);
        if (RcPayVerifyLimitList == null || RcPayVerifyLimitList.size() == 0) {
            return null;
        }
        return RcPayVerifyLimitList.get(0);
    }
}
